<html>
<head><meta charset="utf-8"><title>Closure expression AST · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Closure.20expression.20AST.html">Closure expression AST</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="194621532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Closure%20expression%20AST/near/194621532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Closure.20expression.20AST.html#194621532">(Apr 19 2020 at 22:48)</a>:</h4>
<p>First of all, I think this is a mistake that there is a <code>static</code> ketword attached to <code>LambdaExpr</code> ast node <a href="https://github.com/rust-analyzer/rust-analyzer/blob/90f837829d4f2c1054751de2de695ba1c0b8ae5c/xtask/src/ast_src.rs#L434" title="https://github.com/rust-analyzer/rust-analyzer/blob/90f837829d4f2c1054751de2de695ba1c0b8ae5c/xtask/src/ast_src.rs#L434">here</a>, secondly I'd suggest to unify the naming to closure or lambda everywhere, because in <code>ra_hir_ty</code> it is called <a href="https://github.com/rust-analyzer/rust-analyzer/blob/90f837829d4f2c1054751de2de695ba1c0b8ae5c/crates/ra_hir_ty/src/lib.rs#L152" title="https://github.com/rust-analyzer/rust-analyzer/blob/90f837829d4f2c1054751de2de695ba1c0b8ae5c/crates/ra_hir_ty/src/lib.rs#L152">closure</a>.</p>



<a name="194625250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Closure%20expression%20AST/near/194625250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Closure.20expression.20AST.html#194625250">(Apr 20 2020 at 00:41)</a>:</h4>
<p>Also what is the meaning of <a href="https://github.com/rust-analyzer/rust-analyzer/blob/90f837829d4f2c1054751de2de695ba1c0b8ae5c/xtask/src/ast_src.rs#L465" title="https://github.com/rust-analyzer/rust-analyzer/blob/90f837829d4f2c1054751de2de695ba1c0b8ae5c/xtask/src/ast_src.rs#L465"><code>T![raw]</code> in <code>RefExpr</code></a> @matklad?</p>



<a name="194626085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Closure%20expression%20AST/near/194626085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Emil Lauridsen <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Closure.20expression.20AST.html#194626085">(Apr 20 2020 at 01:08)</a>:</h4>
<p>I believe you can do <code>&amp;raw val</code> to get a <code>*T</code> instead of a normal reference</p>



<a name="194626096"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Closure%20expression%20AST/near/194626096" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Emil Lauridsen <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Closure.20expression.20AST.html#194626096">(Apr 20 2020 at 01:09)</a>:</h4>
<p><a href="https://github.com/rust-lang/rfcs/blob/master/text/2582-raw-reference-mir-operator.md" title="https://github.com/rust-lang/rfcs/blob/master/text/2582-raw-reference-mir-operator.md">https://github.com/rust-lang/rfcs/blob/master/text/2582-raw-reference-mir-operator.md</a></p>



<a name="194640276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Closure%20expression%20AST/near/194640276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Closure.20expression.20AST.html#194640276">(Apr 20 2020 at 07:24)</a>:</h4>
<p>I <em>think</em> static is an (old?) syntax for !Pin generators, or something like that</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>